import React from 'react'
import { Button, Tag, Table } from 'antd'

const data = [
    {
        key: '1',
        name: '快递100',
        identify: "kd100",
        is_open: true,
    },
    {
        key: '2',
        name: '快递鸟',
        identify: "kdbird",
        is_open: false,
    },
];
export default () => {

    const columns: any = [
        {
            title: '名称',
            dataIndex: 'name',
        },
        {
            title: '标识符',
            render: (text: any) => <Tag color="cyan">{text} </Tag>,
            align: "center",
            dataIndex: 'identify',
            hideInSearch: true
        },
        {
            title: '是否开启',
            render: (text: any) => <Tag color="cyan">{text?"开启":"关闭"} </Tag>,
            align: "center",
            dataIndex: 'is_open',
            hideInSearch: true
        },
        {
            title: '操作',
            align: "center",
            render: (text: any, record: any) => (
                <>
                    <Button size="small" type="primary" ghost style={{ marginRight: "6px" }}>编辑</Button>
                </>
            ),
        },
    ];

    return (
        <Table columns={columns} dataSource={data} pagination={false}/>
    )
}